package com.hnichr.ping.tenant.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnichr.ping.tenant.entity.TenantBizType;
import com.hnichr.ping.tenant.mapper.TenantBizTypeMapper;
import com.hnichr.ping.tenant.service.TenantBizTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TenantBizTypeServiceImpl implements TenantBizTypeService {

    @Autowired
    private TenantBizTypeMapper tenantBizTypeMapper;

    @Override
    public TenantBizType getByTenantIdAndBizType(Long tenantId, String bizType) {
        LambdaQueryWrapper<TenantBizType> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(TenantBizType::getTenantId,tenantId).eq(TenantBizType::getBizType,bizType);
        return tenantBizTypeMapper.selectOne(queryWrapper);
    }
}
